package com.jy.appmarket.receiver;


import com.jy.appmarket.utils.LogUtil;
import com.jy.appmarket.utils.NotificationUtil;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;


public class CancelNotificationReceiver extends BroadcastReceiver {

	private static final String TAG = "CancelNotificationReceiver";
	public static final String CANCEL_NOTIFICATION = "com.yj.appmarket.action.CANCEL_NOTIFICATION";
	public static final String NOTIFICATION_ID = "notification_id";

	@Override
	public void onReceive(Context context, Intent intent) {

		LogUtil.d(TAG, "CancelNotificationReceiver onReceive"); 
		if(intent != null) {
			int id = intent.getIntExtra(NOTIFICATION_ID, -1);
			NotificationUtil.cancelNotification(context, id);
		}
	}
}
